#!/bin/sh

#脚本说明：改脚本由start_servers_cent来控制，这里可以不操作。但也可以直接执行。
#
#获取路径
cd `dirname $0`
BIN_DIR=`pwd`

ls_all_files=`ls`


#启动服务
function assertStartSuccess(){
		PIDS=`ps -ef | grep $i|grep -v grep | awk '{print $2}'`	&> /dev/null
		if [ -n "$PIDS" ];then
			echo "ERROR: poggyio-$i has been started!"
			echo "PID: $PIDS"
		else
			sh $BIN_DIR/$i/bin/start.sh
			
		fi
}

#遍历目录下的软链
for i in $ls_all_files;do
	if [ -L $i  ];then
		assertStartSuccess
	fi
done



exit 0